namespace Jumpton.SFA.Server.Entity
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Jumpton.Persistent;
    using System.Data;
    using System.Runtime.Serialization;


    [System.SerializableAttribute()]
    [Map("ORGANIZATION")]
    public class ORGANIZATION : ObjectRow
    {

        public ORGANIZATION()
        {
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dataRow">DataTable 中的一行数据</param>
        /// <param name="objectTable">存储当前对象的数据表格</param>
        public ORGANIZATION(System.Data.DataRow dataRow, ObjectTable parent) :
            base(dataRow, parent)
        {
        }

        /// <summary>
        /// 供反序列化使用的构造函数
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected ORGANIZATION(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
            base(info, context)
        {
        }

        [Key("ID",true,true)]
        public int ID
        {
            get
            {
                return (System.Int32)GetValue("ID");
            }
            set
            {
                SetValue("ID", value);
            }
        }

        [Field("NAME")]
        public string NAME
        {
            get
            {
                return (System.String)GetValue("NAME");
            }
            set
            {
                SetValue("NAME", value.Replace("'", "\'\'"));
            }
        }

        [Field("ParentID")]
        public int ParentID
        {
            get
            {
                return (System.Int32)GetValue("ParentID");
            }
            set
            {
                SetValue("ParentID", value);
            }
        }

        [Field("ORG_LEVEL")]
        public String ORGLEVEL
        {
            get
            {
                return (System.String)GetValue("ORGLEVEL");
            }
            set
            {
                SetValue("ORGLEVEL", value);
            }
        }

        [Field("ACTIVE")]
        public Boolean ACTIVE
        {
            get
            {
                return (System.Boolean)GetValue("ACTIVE");
            }
            set
            {
                SetValue("ACTIVE", value);
            }
        }

        [Field("DOMAIN_ID")]
        public decimal DOMAINID
        {
            get
            {
                return (System.Decimal)GetValue("DOMAINID");
            }
            set
            {
                SetValue("DOMAINID", value);
            }
        }

       

        [Field("REMARK")]
        public string REMARK
        {
            get
            {
                return (System.String)GetValue("REMARK");
            }
            set
            {
                SetValue("REMARK", value.Replace("'", "\'\'"));
            }
        }


        [Field("LAST_UPDATER")]
        public string LAST_UPDATER
        {
            get
            {
                return (System.String)GetValue("LAST_UPDATER");
            }
            set
            {
                SetValue("LAST_UPDATER", value);
            }
        }

        [Field("LAST_UPDATE_TIME")]
        public Decimal LAST_UPDATE_TIME
        {
            get
            {
                return (System.Decimal)GetValue("LAST_UPDATE_TIME");
            }
            set
            {
                SetValue("LAST_UPDATE_TIME", value);
            }
        }
    }
}
